#include "data_collect.h"

int main(int argc, char **argv) {

    ros::init(argc, argv, "data_collect_node");
    ros::NodeHandle nh;
    unsigned int    runFrequency = 20;

    if (0 != Comm_Init(runFrequency, 0.1)) {
        ST_LOG_ERR("Comm Init Fail.");
        return -1;
    }

    DATA_COLLECT_C  objDataCollect(nh);
    if (0 != objDataCollect.Init()) {
        ST_LOG_ERR("DATA_COLLECT_C Object Init Fail.");
        return -1;
    }

    ros::Rate loop_rate(runFrequency);
    
    while (ros::ok())
    {
        Comm_UptByPeriod();
        
        objDataCollect.DataCollect();
        
        ros::spinOnce();
        
        loop_rate.sleep();
    }
}


